#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
    int n;
    cin>>n;
    vector<ll> a(2*n+1);
    vector<ll> res(n+1,0);
    vector<ll> pre1(2*n+1,0),pre2(2*n+1,0);
    for(int i=1;i<=2*n;i++)cin>>a[i];
    for(int i=1;i<=2*n;i++){
    	if(i&1)pre1[i]+=a[i+1]-a[i];
    	else if(i%2==0)pre2[i]+=a[i]-a[i-1];
    	pre1[i]+=pre1[i-1];
    	pre2[i]+=pre2[i-1];
    }
    for(int i=1;i<=n;i++){
    	if(i&1)res[i]=2*(pre1[2*n-i]-pre1[i-1]);
    	else res[i]=2*(pre2[2*n-i]-pre2[i-1]);
    	if(i==1)res[i]/=2;
    	res[i]+=res[i-1];
    }
    for(int i=1;i<=n;i++){
    	cout<<res[i]<<' ';
    }
    cout<<'\n';
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    int t=1;
    cin>>t;
    while(t--){
        solve();
    }
    return 0;
}